package com.shangye.shop.util;

import java.io.File;

public class PathUtil {
    private static String seperator = File.separator;

    public static String getImgBasePath() {
        String os = System.getProperty("os.name");
        String basePath = "";
        if (os.toLowerCase().startsWith("win")) {
            basePath = "D:/image";
        } else {
            basePath = "/Users/shangye/workspace";
        }
        basePath = basePath.replace("/", seperator);
        return basePath;
    }

    public static String getShopImagePath(long id) {
        String imagePath = "/upload/item/shop/" + id + "/";
        return imagePath.replace("/", seperator);
    }
}
